<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>汇率实时转换器</title>
    <link rel="stylesheet" href="style.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
</head>
<body>
    <div class="container">
        <h1>汇率实时转换器</h1>
        <div class="currency-container">
            <div class="currency-box">
                <div class="amount-container">
                    <p>输入金额</p>
                    <input type="number" id="amount" value="1" min="0">
                </div>
                <div class="currency-selection">
                    <p>从</p>
                    <select id="from-currency"></select>
                </div>
            </div>

            <div class="swap-container">
                <button id="swap-btn"><i class="fas fa-exchange-alt"></i></button>
            </div>

            <div class="currency-box">
                <div class="amount-container">
                    <p>转换结果</p>
                    <input type="number" id="result" disabled>
                </div>
                <div class="currency-selection">
                    <p>到</p>
                    <select id="to-currency"></select>
                </div>
            </div>
        </div>

        <div class="info-container">
            <p id="exchange-rate">1 USD = ? CNY</p>
            <p id="last-updated">最后更新时间: </p>
        </div>

        <button id="convert-btn">转换</button>
    </div>

    <footer>
        <p>数据来源: <a href="https://www.exchangerate-api.com" target="_blank">ExchangeRate-API</a></p>
    </footer>

    <script src="script.js"></script>
</body>
</html> 